package com.xindong.paking.service;

import com.xindong.paking.entity.TbOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xindong.paking.utils.Result;
import org.apache.ibatis.annotations.Param;

import javax.xml.crypto.Data;
import java.util.Date;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jielun
 * @since 2023-01-08
 */
public interface TbOrderService extends IService<TbOrder> {

    /*根据用户id查询*/
    Result queryByUser(int userId,Integer status);

    /*条件查询订单*/
    Result queryBycondition(String userId, String carNumber, Integer status, Date startTime, Date endTime,Integer page,Integer pageSize);

    /*结束订单*/
    Result finishOrder(Integer orderId);

    /*查询某个月份订单总金额*/
    Result getOrderMoney();

    /*查询某个月的订单数量*/
    Result totalOrder();

    /*根据id获取订单详情*/
    Result getOrderById(Integer orderid);

    Result payForOrder(Integer orderid);

    /*添加订单*/
    TbOrder addOrder(Integer userId, String carNumber, Integer parkingId, Integer positionId);


}
